package homework00102;

import java.util.ArrayList;
import java.util.Random;

public class Demo7 {

	public static void main(String[] args) {
		chooseEvenNumber();
	}

	private static void chooseEvenNumber() {
		Random num=new Random();
		ArrayList<Integer> arr = new ArrayList<>();
		while(arr.size()<20){
			arr.add((num.nextInt(100)+1));
		}
		ArrayList<Integer> arr1 = new ArrayList<>();
		for (int i=arr.size()-1;i>0;i--){
			if (arr.get(i)%2==0){
				arr1.add(arr.get(i));
			}
		}
		System.out.println(arr1);
		
	}
}
